<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
<title>注册</title>  
</head>  
<body>  
    <form action="__URL__/add"  method="post" >  
      <table width="407" height="424" align="center">  
        <th height="95"><h2>请认真填写以下注册信息</h2></th>  
      <tr>  
      <td><table align="center">  
        <tr>  
          <td>User ID：</td>  
          <td><input type="text" name="user_id" onkeyup="showHint(this.value)">
          <span><b id="hint"></b></span></td>  
        </tr>  
        <tr>  
          <td>Nick name：</td>
          <td><input type="text" name="nick"></td> 
        </tr>
        <tr>  
          <td>Password：</td>  
          <td><input type="password" name="password"></td>  
        </tr>  
        <tr>  
          <td>Repeat Password：</td>  
          <td><input type="password" name="repassword"></td>  
        </tr>  
        <tr>  
          <td>School：</td>  
          <td><input type="text" name="school"></td>  
        </tr>  
        <tr>
          <td>Email：</td>
          <td><input type="text" name="email"></td>
        </tr>
        <tr>
          <td>Motto：</td>
          <td><textarea name="motto"></textarea></td>
        </tr>
        <tr>
          <td>Share Code：</td>
          <td>
            <input type="radio" name="is_share" value="Yes">Yes
            <input type="radio" name="is_share" value="No" checked="true">No
          </td>
        </tr>
        <tr>  
          <td>验证码:</td>  
          <td><input type="text" name="verify" >  
            <img id="verify" alt="验证码" onClick="show()" src="__URL__/verify"><a href="javascript:show()">看不清楚</a></td>  
        </tr>  
        <tr>  
          <td colspan="2"><input type="submit" value="注册"></td>  
          </tr> 
        </table>
      </td>  
      </tr>  
      </table>  
</form>  
</body>  
</html>  
  
<script>  
    function show(){  
        document.getElementById("verify").src="__URL__/verify/random"+Math.random();  
    }  
</script> 
<script type="text/javascript">
    function showHint(str){
        var xmlhttp;
        if(str.length==0){
            document.getElementById("hint").innerHTML = "";
            return;
        }
        xmlhttp = new XMLHttpRequest();
        xmlhttp.onreadystatechange = function(){
            if(xmlhttp.readyState==4 && xmlhttp.status==200){
                document.getElementById("hint").innerHTML = xmlhttp.responseText;
            }
        }
        xmlhttp.open("get","__URL__/checkId?str=" + str,true);
        xmlhttp.send();
    }
</script>